import fs from 'fs'
import path from 'path'

export const listFiles = (files: string[]) => {
  const file1 = files[0]
  const isDirectory = fs.lstatSync(file1).isDirectory()
  if (isDirectory) {
    const file = fs.readdirSync(file1)
    const filePaths = file.map((file) => path.join(file1, file))
    return filePaths
  }
  return null
}
